﻿using System;
using Cosmos.Compiler.Builder;
namespace weOS
{
    class Program
    {
        #region Cosmos Builder logic
        // Most users wont touch this. This will call the Cosmos Build tool
        [STAThread]
        static void Main(string[] args)
        {
            BuildUI.Run();
        }
        #endregion

        // Main entry point of the kernel
        public static void Init()
        {
            var xBoot = new Cosmos.Sys.Boot();
            xBoot.Execute();
            Console.WriteLine("Welcome to weOS!");
            Console.WriteLine("What would you like to do? Type in 'help' for a list of cmds.");
            var UI = Console.ReadLine();
            if (UI == "shutdown")
            {
                Console.Clear();
                Cosmos.Sys.Deboot.ShutDown();
            }
            if (UI == "reboot")
            {
                Console.Clear();
                Cosmos.Sys.Deboot.Reboot();
            }
            if (UI == "help")
            {
                Console.WriteLine("Commands:");
                Console.WriteLine("help = Displays this screen.");
                Console.WriteLine("shutdown = Shuts down System.");
                Console.WriteLine("reboot = Reboots the system.");
                Console.WriteLine("cl = Clears the screen.");
                Console.WriteLine("ls = Looks in a certain folder");
                Console.WriteLine("WARNING!!! the ls command is being worked on so dont use it.");
                Console.WriteLine("startcocoa = Starts the User Interface Cocoa. (In dev)");
                Console.WriteLine("startg = Starts the User Interface Green. (In dev)");
            }
            if (UI == "cl")
            {
                Console.Clear();
            }
            if (UI == "ls")
            {
                Console.WriteLine("Sorry there is no filesystem...");
            }
            if (UI == "startcocoa")
            {
                Console.WriteLine("This command doesn't work for there is no UI called cocoa yet");
                Console.WriteLine("but cocoa is being developed so stay tuned!");
            }
                ;
        }
    }
}